using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace Liya.Crm.Data.Models.Mapping
{
    public class Sys_RoleMap : EntityTypeConfiguration<Sys_Role>
    {
        public Sys_RoleMap()
        {
            // Primary Key
            this.HasKey(t => t.RId);

            // Properties
            this.Property(t => t.RName)
                .HasMaxLength(50);

            this.Property(t => t.RMemo)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Sys_Role");
            this.Property(t => t.RId).HasColumnName("RId");
            this.Property(t => t.RName).HasColumnName("RName");
            this.Property(t => t.RMemo).HasColumnName("RMemo");
        }
    }
}
